const express = require('express')
const app = express()


//路由导出
const userRouter = require('./router/user')
const filesRouter = require('./router/files')
const curriculumRouter = require('./router/curriculum')
const performanceRouter = require('./router/performance')

//导入跨域处理插件
const cors = require('cors')
app.use(cors())


// 启用处理`application/json`请求体的中间件
app.use(express.json());
app.use(express.text())
//配置解析 application/x-www-form-urlencoded 格式的表单数据的中间件
app.use(express.urlencoded({extended:false}))



app.use('/api',userRouter)
app.use('/api',filesRouter)
app.use('/api',curriculumRouter)
app.use('/api',performanceRouter)

app.listen(3060,'127.0.0.1',()=>{
    console.log('http://127.0.0.1:3060')
})
